package com.ujs.service.impl;

import com.ujs.dao.TravellerDao;
import com.ujs.pojo.Traveller;
import com.ujs.service.TravellerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TravellerServiceImpl implements TravellerService {
    @Autowired
    private TravellerDao travellerDao;
    @Override
    public List<Traveller> findAll(){
        return travellerDao.findAll();
    }
    @Override
    public Traveller findById(String id){
        return travellerDao.getOne(id);
    }
    @Override
    public void save(Traveller traveller){
        travellerDao.save(traveller);
    }
    @Override
    public void deleteById(String id){
        travellerDao.deleteById(id);
    }
}
